package cn.pconline.autoclub.entity;

import java.util.Date;
import org.gelivable.dao.Column;
import org.gelivable.dao.Entity;
import org.gelivable.dao.Id;
import org.gelivable.dao.Label;
import org.gelivable.dao.Transient;

/**
 *
 * @author ppc
 */
@Entity(tableName = "ac_gift_conversion")
public class GiftConversion {

    public static final int STATUS_SEND = 1; //已发货
    public static final int STATUS_NOSEND = 0; //未发货
    public static final int STATUS_DOWN = -1; //驳回
    public static final int STATUS_UNPAYMENT = 2;//待付款
    public static final int STATUS_NOSELECT = -2;//查询所有
    @Id
    @Column(name = "conversion_id")
    @Label(value = "记录ID")
    private long conversionId;
    @Column(name = "gift_id")
    @Label(value = "礼品ID")
    private long giftId;
    @Column(name = "user_id")
    @Label(value = "用户ID")
    private long userId;
    @Column(name = "create_at")
    @Label(value = "兑换时间")
    private Date createAt;
    @Column(name = "update_at")
    @Label(value = "更新时间")
    private Date updateAt;
    @Column(name = "shipments_at")
    @Label(value = "发货时间")
    private Date shipmentsAt;
    @Column(name = "status")
    @Label(value = "状态")
    private int status;
    @Column(name = "gold")
    @Label(value = "消耗金币")
    private long gold;
    @Column(name = "audit_by")
    @Label(value = "审核人")
    private long auditBy;
    @Column(name = "num")
    @Label(value = "兑换数量")
    private int num;
    @Column(name = "truename")
    @Label(value = "真实姓名")
    private String trueName;
    @Column(name = "address")
    @Label(value = "详细地址")
    private String address;
    @Column(name = "postcode")
    @Label(value = "邮编")
    private String postcode;
    @Column(name = "phone")
    @Label(value = "电话")
    private String phone;
    @Column(name = "reject_reason")
    @Label(value = "驳回理由")
    private String rejectMsg;
    @Column(name = "log_id")
    @Label(value = "消费记录ID")
    private long logId;
    @Transient
    private Gift gift;
    @Transient
    private User user;

    public long getConversionId() {
        return conversionId;
    }

    public long getGiftId() {
        return giftId;
    }

    public long getUserId() {
        return userId;
    }

    public Date getCreateAt() {
        return createAt;
    }

    public Date getShipmentsAt() {
        return shipmentsAt;
    }

    public int getStatus() {
        return status;
    }

    public long getGold() {
        return gold;
    }

    public long getAuditBy() {
        return auditBy;
    }

    public int getNum() {
        return num;
    }

    public void setConversionId(long conversionId) {
        this.conversionId = conversionId;
    }

    public void setGiftId(long giftId) {
        this.giftId = giftId;
    }

    public void setUserId(long userId) {
        this.userId = userId;
    }

    public void setCreateAt(Date createAt) {
        this.createAt = createAt;
    }

    public Date getUpdateAt() {
        return updateAt;
    }

    public void setUpdateAt(Date updateAt) {
        this.updateAt = updateAt;
    }

    public void setShipmentsAt(Date shipmentsAt) {
        this.shipmentsAt = shipmentsAt;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public void setGold(long gold) {
        this.gold = gold;
    }

    public void setAuditBy(long auditBy) {
        this.auditBy = auditBy;
    }

    public void setNum(int num) {
        this.num = num;
    }

    public Gift getGift() {
        return gift;
    }

    public User getUser() {
        return user;
    }

    public void setGift(Gift gift) {
        this.gift = gift;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public String getTrueName() {
        return trueName;
    }

    public String getAddress() {
        return address;
    }

    public String getPostcode() {
        return postcode;
    }

    public String getPhone() {
        return phone;
    }

    public void setTrueName(String trueName) {
        this.trueName = trueName;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public void setPostcode(String postcode) {
        this.postcode = postcode;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getRejectMsg() {
        return rejectMsg;
    }

    public void setRejectMsg(String rejectMsg) {
        this.rejectMsg = rejectMsg;
    }

    public long getLogId() {
        return logId;
    }

    public void setLogId(long logId) {
        this.logId = logId;
    }
}
